package jblip.apps.clip.cmds;

import java.util.Enumeration;

import jblip.BlipClient;
import jblip.apps.clip.ClipPrinter;
import jblip.resources.Update;

public class Bliposphere extends ClipCommand {

  @Override
  public int getRequiredArgsCount() {
    return 0;
  }

  @Override
  public int getMaximumArgsCount() {
    return 0;
  }

  @Override
  public void execute(BlipClient client, String[] args) {
    Enumeration<? extends Update> updates =
        client.pollBliposhere(null, null, null);
    if (updates != null) {
      while (updates.hasMoreElements()) {
        ClipPrinter.print(updates.nextElement());
      }
    } else {
      System.out.println("ERROR: " + client.getLastError());
    }
  }

  @Override
  public String getName() {
    return "bliposhpere";
  }

  @Override
  public String getUsageMessage() {
    return "";
  }

}
